﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PricingOceanForSales.aspx.cs"
    Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <!--#include virtual="include/Head.ascx"-->
    <link rel="stylesheet" type="text/css" href="assets/css/datepicker.css" />
    <script type='text/javascript' src="assets/js/jquery.ui.datepicker.js"></script>
    <script type='text/javascript' src="Assets/js/zoom.js"></script>
    <link rel="stylesheet" href="Assets/css/zoom.css" type="text/css" />
    <script type="text/javascript" language="javascript">
        function doDelete(strID, strName) {
            if (confirm('Bạn có thực sự muốn xóa ' + strName + '?')) {
                var vnpage = getUrlVars()['page_number'];
                var vChar = getUrlVars()['letter'];
                var strHref = "";
                if (vnpage)
                    strHref = "PricingOceanForSales.aspx?action=delete&ID=" + strID + "&page_number=" + vnpage;
                else
                    strHref = "PricingOceanForSales.aspx?action=delete&ID=" + strID;

                if (vChar)
                    window.location.href = strHref + "&letter=" + vChar;
                else
                    window.location.href = strHref;
            }
        }
        function doEdit(ID) {
            var url = "PricingOceanForSales.Edit.aspx";
            if (ID)
                url = "PricingOceanForSales.Edit.aspx?id=" + ID;
            window.open(url, 'customerRelationEdit', 'width=1280,height=680,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0');
        }
        function doRefer(ID, PolID, podID) {
            var url = "Prices.aspx?PortToID=" + PolID + "&PortFromID=" + podID + "&pOceanID=" + ID;
            window.open(url, '_blank');
        }
        $(document).ready(function () {
            $("#txtFrom").datepicker({ dateFormat: "dd-mm-yy" });
            $("#txtTo").datepicker({ dateFormat: "dd-mm-yy" });
            $('*[zoomable="true"]').InitialZoom();
        });
    </script>
    <style type="text/css">
        .notice2hour {
            font-weight: bold;
            color: #FFA500;
        }

        .notice4hour {
            color: #EE82EE;
            font-weight: bold;
        }

        .notice8hour {
            color: #FF0000;
            font-weight: bold;
        }

        .isContRequet {
            background: url("Assets/images/Icons/Multiply.png");
        }
    </style>
</head>
<body>
    <div id="body-wrapper">
        <div id="header">
            <!--#include virtual="include/top.ascx"-->
        </div>
        <div id="main-content1">
            <h2></h2>
            <div class="content-box" zoomable="true">
                <form id="frmEdit" runat="server" autocomplete="off">
                    <div class="content-box-header">
                        <h3 style="cursor: s-resize;">PRICING OCEAN FOR SALES</h3>

                        <input id="btnAddNew" type="button" style="float: right; margin: 9px 10px;" class="button" runat="server"
                            onclick="doEdit();" value="Add new" />
                        <div style="float: right; margin: 7px;">
                            <asp:DropDownList ID="ddEnquiry" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddEnquiry_SelectedIndexChanged" Visible="false">
                                <asp:ListItem Value="0" Text="--Color--"></asp:ListItem>
                                <asp:ListItem Value="8" Text="Red"></asp:ListItem>
                                <asp:ListItem Value="4" Text="Purple"></asp:ListItem>
                                <asp:ListItem Value="2" Text="Orange"></asp:ListItem>
                            </asp:DropDownList>
                            <asp:DropDownList ID="ddUser" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddUser_SelectedIndexChanged">
                            </asp:DropDownList>
                            <asp:DropDownList ID="ddLocationSearch" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddLocationSearch_SelectedIndexChanged" Visible="false">
                            </asp:DropDownList>
                        </div>
                        <div class="clear">
                        </div>
                        <div style="float: left; margin: 10px 5px; width: 100%;">

                            <asp:DropDownList ID="ddCarrSearch" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddCarrSearch_SelectedIndexChanged" Width="75px" Visible="false">
                            </asp:DropDownList>
                            <asp:DropDownList ID="ddPolSearch" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddPolSearch_SelectedIndexChanged" Width="100px" Visible="false">
                            </asp:DropDownList>
                            <asp:DropDownList ID="ddFrmCountrySearch" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddFrmCountrySearch_SelectedIndexChanged" Width="120px" Visible="false">
                            </asp:DropDownList>
                            <asp:DropDownList ID="ddSerAreaFromSearch" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddSerAreaFromSearch_SelectedIndexChanged" Width="120px" Visible="false">
                            </asp:DropDownList>
                            <asp:DropDownList ID="ddRegionFromSearch" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddRegionFromSearch_SelectedIndexChanged" Width="120px" Visible="false">
                            </asp:DropDownList>
                            <asp:DropDownList ID="ddPodSearch" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddPodSearch_SelectedIndexChanged" Width="100px" Visible="false">
                            </asp:DropDownList>
                            <asp:DropDownList ID="ddToCountrySearch" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddToCountrySearch_SelectedIndexChanged" Width="120px" Visible="false">
                            </asp:DropDownList>
                            <asp:DropDownList ID="ddSerAreaToSearch" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddSerAreaToSearch_SelectedIndexChanged" Width="120px" Visible="false">
                            </asp:DropDownList>
                            <asp:DropDownList ID="ddRegionToSearch" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddRegionToSearch_SelectedIndexChanged" Width="120px" Visible="false">
                            </asp:DropDownList>
                            <asp:TextBox ID="txtFrom" CssClass="calendar-icon ItemSearch" runat="server" value="From" Visible="false"
                                onclick="if(this.value=='From'){this.value=''; this.style.color='#000'}" onblur="if(this.value==''){this.value='From'; this.style.color='#555'}"
                                Width="80px"></asp:TextBox>
                            <asp:TextBox ID="txtTo" CssClass="calendar-icon ItemSearch" runat="server" value="To" Visible="false"
                                Width="80px" onclick="if(this.value=='To'){this.value=''; this.style.color='#000'}"
                                onblur="if(this.value==''){this.value='To'; this.style.color='#555'}"></asp:TextBox>
                            &nbsp;<asp:Button ID="btnSearch" runat="server" Text="&nbsp;Seach&nbsp;" CssClass="button"
                                OnClick="btnSearch_Click" Visible="false" />
                        </div>
                    </div>
                    <fieldset>
                        <asp:Repeater ID="rptData" runat="server" OnItemDataBound="rptData_ItemDataBound">
                            <ItemTemplate>
                                <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">
                                    <td align="center">
                                        <%# DataBinder.Eval(Container.DataItem, "Index")%>
                                    </td>
                                    <td width="100px">
                                        <%# DataBinder.Eval(Container.DataItem, "PolName") %>
                                    </td>
                                    <td width="100px">
                                        <%# DataBinder.Eval(Container.DataItem, "PodName") %>
                                    </td>
                                    <td width="50px">
                                        <%# DataBinder.Eval(Container.DataItem, "UserRequest") %>
                                    </td>
                                    <td width="90px" class="<%# GetNoticeClass(Eval("UpdateTimeRequest"),Eval("DC20"),Eval("DC40"),Eval("HC40"),Eval("RF20"),Eval("RF40")) %>">
                                        <%# DataBinder.Eval(Container.DataItem, "UpdateTimeRequest") %>
                                    </td>
                                    <td align="center" width="30px">
                                        <asp:HiddenField ID="hidTargeted" Value='<%#Eval("Targeted") %>' runat="server" />
                                        <asp:CheckBox ID="cbTargeted" runat="server" />
                                    </td>
                                    <td width="50px">
                                        <%# DataBinder.Eval(Container.DataItem, "UserResponse") %>
                                    </td>
                                    <td width="50px">
                                        <%# DataBinder.Eval(Container.DataItem, "DC20") %>
                                    </td>
                                    <td width="50px">
                                        <%# DataBinder.Eval(Container.DataItem, "DC40") %>
                                    </td>
                                    <td width="50px">
                                        <%# DataBinder.Eval(Container.DataItem, "HC40") %>
                                    </td>
                                    <td width="50px">
                                        <%# DataBinder.Eval(Container.DataItem, "RF20") %>
                                    </td>
                                    <td width="50px">
                                        <%# DataBinder.Eval(Container.DataItem, "RF40") %>
                                    </td>
                                    <td width="50px">
                                        <%# DataBinder.Eval(Container.DataItem, "CarrName")%>
                                    </td>
                                    <td width="30px">
                                        <%# DataBinder.Eval(Container.DataItem, "FRE")%>
                                    </td>
                                    <td width="50px">
                                        <%# DataBinder.Eval(Container.DataItem, "TT_Response")%>
                                    </td>
                                    <td align="center" width="50px">
                                        <%# DataBinder.Eval(Container.DataItem, "Suare")%>
                                    </td>
                                    <td>
                                        <%# DataBinder.Eval(Container.DataItem, "Note_Response")%>
                                    </td>
                                    <td align="center" width="30px">
                                        <asp:HiddenField ID="hidBkg" Value='<%#Eval("Bkg") %>' runat="server" />
                                        <asp:CheckBox ID="cbBkg" runat="server" />
                                    </td>
                                    <td align="center">
                                        <%# DataBinder.Eval(Container.DataItem, "Idea")%>
                                    </td>
                                    <%if (nPermissions >= 3)
                                      { %>
                                    <td align="center">
                                        <%# DataBinder.Eval(Container.DataItem, "Action")%>
                                    </td>
                                    <%} %>
                                </tr>
                            </ItemTemplate>
                            <HeaderTemplate>
                                <div autofit="true" style="">
                                    <table editcellcontent="true" cellspacing="0" cellpadding="0" width="auto" border="0"
                                        class="adminlist" resizeable="true">
                                        <thead>
                                            <tr style="background: #CCC;">
                                                <th align="center" width="30px">Index
                                                </th>
                                                <th align="center">Pol
                                                </th>
                                                <th align="center">Pod
                                                </th>
                                                <th align="center">Sales
                                                </th>
                                                <th align="center">Date
                                                </th>
                                                <th align="center">Tget
                                                </th>
                                                <th align="center">Pricing
                                                </th>
                                                <th align="center">DC20
                                                </th>
                                                <th align="center">DC40
                                                </th>
                                                <th align="center">HC40
                                                </th>
                                                <th align="center">RF20
                                                </th>
                                                <th align="center">RF40
                                                </th>
                                                <th align="center">Carr
                                                </th>
                                                <th align="center">FRE
                                                </th>
                                                <th align="center">Key T/T
                                                </th>
                                                <th align="center">Sure
                                                </th>
                                                <th align="center">Note
                                                </th>
                                                <th align="center">Bkg
                                                </th>
                                                <th align="center">Feedback
                                                </th>
                                                <%if (nPermissions >= 3)
                                                  { %>
                                                <th align="center" width="120px">Action
                                                </th>
                                                <%} %>
                                            </tr>
                                        </thead>
                            </HeaderTemplate>
                            <FooterTemplate>
                                </TABLE></div>
                            </FooterTemplate>
                        </asp:Repeater>
                    </fieldset>
                    <div class="clear">
                    </div>
                    <div id="footer">
                        <%=strPager%>
                    </div>
                </form>
            </div>
        </div>
    </div>
</body>
</html>
